<template>
  <div v-if="recruitTrendsData.length" :id="`menuScroll${scrollFirstIndex}-${scrollSecondIndex}`"
    class="salary-container cardWrapper">
    <div class="total-salary">
      <div class="salary-title">
        <img class="item-img" src="https://img3.job1001.com/data_center/images/position_item_icon.png" alt="404" />
        <span class="item-title">招聘趋势</span>
      </div>
      <div v-for="item,index in recruitTrendsData" :key="index">
        <div class="region-salary" :id="`scroll${scrollSecondIndex}-${index}`" v-if="item.layerId==122">
          <recruitHeat />
        </div>
        <div class="region-salary" v-else-if="item.layerId==161" :id="`scroll${scrollSecondIndex}-${index}`">
          <hotRecruitCity />
        </div>
        <div class="region-salary" v-else-if="item.layerId==198" :id="`scroll${scrollSecondIndex}-${index}`">
          <industryRecruitHot />
        </div>
        <div class="region-salary" v-else-if="item.layerId==199" :id="`scroll${scrollSecondIndex}-${index}`">
          <companyRecruitHot />
        </div>
        <!-- <generalTextComponent v-else :key="index" :scrollFirstIndex="scrollFirstIndex" :layerList="secondLayerList"
          :layerItem="item" :topId="topId" :isAdmin="isAdmin" :aiCreateStatus.sync="aiCreateStatus"
          :isSuperToken="isSuperToken" /> -->
      </div>
    </div>
  </div>
</template>
  
  <script>
import industryRecruitHot from "@/views/position/RecruitmentOverview/recruitTrends/components/industryRecruitHot.vue";
import companyRecruitHot from "@/views/position/RecruitmentOverview/recruitTrends/components/companyRecruitHot.vue";
import recruitHeat from "@/views/position/recruit_heat";
import hotRecruitCity from "./components/hotRecruitCity";
import SelectRegion from "@/components/SelectRegion";
import browser from "browser-tool";

export default {
  name: "recruitTrends",
  props: {
    recruitTrendsData: {
      type: Array,
      default: () => [],
    },
    scrollFirstIndex: {
      type: [String, Number],
      default: 0,
    },
    scrollSecondIndex: {
      type: [String, Number],
      default: 0,
    },
  },
  components: {
    SelectRegion,
    recruitHeat,
    hotRecruitCity,
    industryRecruitHot,
    companyRecruitHot,
  },
  data() {
    return {
      SecretKey:
        this.$route.query.SecretKey || localStorage.getItem("SecretKey"),
      isShitBrowser: false,
    };
  },
  created() {
    const browserInfo = browser();
    if (browserInfo.browser != "Chrome") {
      this.isShitBrowser = true;
    }
  },
  mounted() {},
  methods: {},
};
</script>
  
  <style scoped lang="scss">
.salary-container {
  position: relative;
  min-width: 800px;
  padding-top: 0px;
  padding-right: 0px;

  margin-bottom: 20px;
  overflow: scroll;
  &::-webkit-scrollbar {
    width: 4px;
    background-color: #fff;
    border-radius: 4px;

    height: 4px;
  }
  &::-webkit-scrollbar-thumb {
    background-color: #d8d8d8;
    border-radius: 4px;
  }
}
.total-salary {
  // background: linear-gradient(0, #eaf5ff 0%, #ffffff 100%);
  background-size: 100% 219px;
  background-repeat: no-repeat;
  background-image: url("https://img3.job1001.com/data_center/images/salary_bg.png?v=1");
  // background: #ffffff;
  border-radius: 10px;
  border: 1px solid #cbdcfe;
  padding: 20px;
}
.salary-title {
  display: flex;
  align-items: center;
  .item-img {
    width: 39px;
    height: 40px;
    align-self: center;
  }
  .item-title {
    margin-left: 10px;
    color: #000;
    font-size: 22px;
    font-weight: bold;
    font-family: PingFang SC;
  }
}
.isShitBrowser {
  background-position: 0px 0px;
}
</style>
  